import Vue from 'vue'
import VueRouter from "vue-router"
Vue.use(VueRouter);
const router =new VueRouter({
    routes:[
        {
          path:"/",
          redirect:"/home",
        },
        {
            path:"/home",
            component:()=>import("../pages/home"),
            meta:{
                showFooter:true,
            },
        },
        {
            path:"/fenlei",
            component:()=>import("../pages/fenlei"),
            meta:{
                showFooter:true,
            },
        },
        {
            path:"/cart",
            component:()=>import("../pages/cart"),
            meta:{
                showFooter:true,
            },
        },
        {
            path:"/mine",
            component:()=>import("../pages/mine"),
            meta:{
                showFooter:true,
            },
        },
        {
            path:"/register",
            component:()=>import("../pages/register"),
            meta:{
                showFooter:false,
            },
        },
        {
            path:"/login",
            component:()=>import("../pages/login"),
            meta:{
                showFooter:false,
            },
        },
        {
            path:"/detail/:id",
            component:()=>import("../pages/detail"),
            meta:{
                showFooter:false,
            },
        },
        {
            path:"/address",
            component:()=>import("../pages/address"),
            meta:{
                showFooter:false,
            },
        },
        {
            path:"/order",//商品订单页面
            component:()=>import("../pages/order"),
            meta:{
                showFooter:false,
            },
        },
        {
            path:"/changepassword",//修改密码界面
            component:()=>import("../pages/changepassword"),
            meta:{
                showFooter:false,
            },
        },
        {
            path:"/changeuser",//修改用户信息界面
            component:()=>import("../pages/changeuser"),
            meta:{
                showFooter:false,
            },
        },
        {
            path:"/toorderdetail/:id",//跳转到列表详情页面
            component:()=>import("../pages/toorderdetail"),
            meta:{
                showFooter:false,
            },
        },
        {
            path:"/receipt",//收货信息界面
            component:()=>import("../pages/receipt"),
            meta:{
                showFooter:false,
            },
        },
        {
            path:"/changereceipt/:id",//修改收货信息界面
            component:()=>import("../pages/tochangereceipt"),
            meta:{
                showFooter:false,
            },
        },
    ]
})
export default router;